<%@ include file="/common/header.jsp" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<style>
    body {
        overflow: auto;
    }
    .form-control[disabled], fieldset[disabled] .form-control {
        cursor: pointer;
    }
</style>
<body ng-init="XH='${XH}';FLAG='${FLAG}';">
<div ng-controller="mbManageController">
    <div>
        <div style="width: 1200px;">
            <div style="margin-top: 25px;margin-bottom:15px;float: right;">
                <button ng-if="FLAG=='add'" type="button" class="btn btn-default btn-sm save" ng-click="add()">保存
                </button>
                <button ng-if="FLAG=='edit'" type="button" class="btn btn-default btn-sm save" ng-click="edit()">保存
                </button>
            </div>
        </div>
        <div>
            <form id="myForm" name="validateForm">
                <div>
                    <div class="mod-header" style="width: 1150px;">
                        <input type="text" ng-model="mbInfo.BT"
                               style="margin-left: 65px;"
                               class="form-control easyui-validatebox"
                               data-options="validType:'length[1,50]',required:true,tipPosition:'bottom'"
                               placeholder="请输入模板名称">
                    </div>
                    <div>
                        <span style="float: left;margin-top: 6px;margin-left: 8px;margin-left: 65px;">模板类型：</span>
                        <div style="float: left;">
                            <codeset dmjbh="FWSZPT_GZBG_MBGL_MBLX" ng-model="mbInfo.MBLX" ng-validate="true"
                                     ng-type="radio"></codeset>
                        </div>
                    </div>
                    <div>
                        <table  ng-repeat="item in mbzdList" class="table-form table table-bordered" style="margin: 45px 35px;width: 1200px;">
                            <colgroup>
                                <col width="200px">
                                <col width="*">
                            </colgroup>
                            <tbody>
                            <tr>
                                <th>文本标题：</th>
                                <td>
                                    <input type="text" ng-model="item.ZDMC"
                                           class="form-control easyui-validatebox"
                                           data-options="validType:'length[1,200]',required:true,tipPosition:'bottom'"
                                           placeholder="请输入模板名称">
                                </td>
                            </tr>
                            <tr>
                                <th>段落模板：</th>
                                <td>
                                    <textarea elastic style="max-height: 100%;min-height: 100px;resize: none;border: 1px solid #CCC;"
                                              ng-model="item.ZDMB" name="cs_tznr"
                                              class="form-control easyui-validatebox" placeholder="请填写处理意见"
                                              data-options="validType:'length[1,10000]',tipPosition:'bottom'"></textarea>
                                </td>
                            </tr>
                            <tr>
                                <th>字段提示：</th>
                                <td>
                                    <textarea elastic style="max-height: 100%;min-height: 100px;resize: none;border: 1px solid #CCC;"
                                              ng-model="item.ZDTS" name="cs_tznr"
                                              class="form-control easyui-validatebox" placeholder="请填写字段提示"
                                              data-options="validType:'length[1,10000]',required:true,tipPosition:'bottom'"></textarea>
                                </td>
                            </tr>
                            <tr>
                                <th>排序号：</th>
                                <td>
                                    <input type="text" ng-model="item.PXH"
                                           class="form-control easyui-validatebox"
                                           data-options="validType:['length[1,50]','positiveinteger'],required:true,tipPosition:'bottom'"
                                           placeholder="请输入排序号">
                                </td>
                            </tr>
                            <tr>
                                <th>附件功能：</th>
                                <td>
                                    <codeset dmjbh="FWSZPT_GZBG_MBGL_SFQYFJ" ng-model="item.SFQYFJ" ng-validate="true"
                                             ng-type="radio"></codeset>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2" ng-mouseover="showOtherBtns = true" ng-mouseleave="showOtherBtns = false" ng-init="showOtherBtns = false">
                                    <button type="button" class="icon-del-line" ng-click="deleteTableLine($index, $event);">删除</button>
                                </td>
                            </tr>

                            </tbody>
                        </table>
                    </div>
                </div>

                <button style="margin-left: 45px;margin-bottom: 15px;" type="button" class="icon-add-line" ng-click="addLastLine()">点击添加</button>
            </form>
        </div>
    </div>
</div>
<script type="text/javascript"
        src="<common:webRoot/>/resources/fwszpt/gzbg/mb/js/MbManage.js?v=${sysversion}"></script>
</body>
<%@ include file="/common/footer.jsp" %>
